﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PrimeEditor.GameProject
{
    /// <summary>
    /// ProjectBrowserDialg.xaml 的交互逻辑
    /// </summary>
    public partial class ProjectBrowserDialg : Window
    {
        public ProjectBrowserDialg()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 处理 打开项目和新建项目，  选中一个， 另一个变灰色
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnToggleButton_Click(object sender, RoutedEventArgs e)
        {
            if (sender == openProjectButton)
            {
                if (newProjectButton.IsChecked == true)
                {
                    newProjectButton.IsChecked = false;
                    browserContent.Margin = new Thickness(0);
                }

                openProjectButton.IsChecked = true;
            }
            else
            {

                if (openProjectButton.IsChecked == true)
                {
                    openProjectButton.IsChecked = false;
                    browserContent.Margin = new Thickness(-800,0,0,0);
                }

                newProjectButton.IsChecked = true;
            }
        }

       
    }
}
